package com.primb.bench.project.init.contract;

import com.primb.baselibs.base.BasePresenter;
import com.primb.baselibs.base.BaseView;
import com.primb.bench.project.home.entity.LogoInfoEntity;
import com.primb.bench.project.init.entity.LoginEntity;

import rx.Observable;

/**
 * Created by Chen on 2017/4/13.
 * 功能描述：
 */

public class LoginContract {

    public interface View{
        /**
         * 获取用户名
         */
        String getAccountStr();

        /**
         * 获取密码
         */
        String getPwdStr();

        /**
         * 显示加载进度
         */
        void showLoading();

        /**
         * 隐藏加载进度
         */
        void hideLoading();

        /**
         * 显示错误信息
         */
        void showError(String message);

        /**
         * 账号密码是否为空
         *
         * @param account
         * @param pwd
         * @return
         */
        boolean isEmpty(String account, String pwd);

        void intentToMain(LoginEntity entity);

    }

    public interface Presenter extends BasePresenter {

    }

    public interface Model {
        Observable<LoginEntity> login(String username, String password);
    }
}